<?php

// This file is part of the Carrington Text Theme for WordPress
// http://carringtontheme.com
//
// Copyright (c) 2008-2009 Crowd Favorite, Ltd. All rights reserved.
// http://crowdfavorite.com
//
// Released under the GPL license
// http://www.opensource.org/licenses/gpl-license.php
//
// **********************************************************************
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
// **********************************************************************

if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
if (CFCT_DEBUG) { cfct_banner(__FILE__); }

get_header();

$basePath = '/press-release/';
//$basePath = bloginfo('wpurl').'/mediacenter/';
if(isset($_GET['postyear'])){
    $year = $_GET['postyear'];
}

?>

<div id="main">
	<h1 class='editorial-title'>Press release</h1>
	<br>
	<h3>Select a year to filter the articles:</h3>
	
	<ul class="yearNav">
	
		<?php
		
		for ($i = 0; $i <= 4; $i++) {
			$loopYear = 2011-$i;
			if($loopYear != intval($_GET['postyear']))
			{
			?>
   			 <li><a href="<?php echo $basePath.'?postyear='.$loopYear ?>"><?php echo $loopYear;?></a></li>
   			<?php
   			}else{
   			?>
   			 <li><a id='selected-year' href="<?php echo $basePath.'?postyear='.$loopYear ?>"><?php echo $loopYear;?></a></li>
   			<?php
   			}
		}

		?>
	</ul>
	
	<div id="news">
		<?php cfct_loop(); ?>
	</div>

</div>

<?php get_footer();?>